<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>  
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
	<table>
		<tr>
			<td>商品Id</td>
			<td>商品名</td>
			<td>商品厂家</td>
			<td>商品类型</td>
			<td>商品价格</td>
			<td>商品库存</td>
			<td>操作</td>
		</tr>
		<c:forEach items="${page.data}" var="goods">
			<tr>
				<td>${goods.goodsId}</td>
				<td>${goods.goodsName}</td>
				<td>${goods.goodsFactory}</td>
				<td>${goods.goodsType}</td>
				<td>${goods.goodsPrice}</td>
				<td>${goods.goodsNum}</td>
				<td>
					<a href="deleteGoods.do?GoodsId=${goods.goodsId}" class="action-link">删除</a>
				</td>
			</tr>
		</c:forEach>
		 
	</table>
	<div>
		<c:if test="${page.havePrev}">
			<a href="selectGoods.do?pageNum=${page.pageNum-1}">上一页</a>
		</c:if>
		<c:forEach begin="1" end="${page.totalPages}" var="i">
			<a href="selectGoods.do?pageNum=${i}">${i}</a>
		</c:forEach>
		<c:if test="${page.haveNext}"><a href="selectGoods.do?pageNum=${page.pageNum+1}">下一页</a></c:if>
	</div>
</body>
</html>